package com.glhtgyxy.biyesheji.Controller;


import com.glhtgyxy.biyesheji.Pojo.user;
import com.glhtgyxy.biyesheji.Service.dlzcService;
import com.glhtgyxy.biyesheji.Service.glydlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;

@Controller
@RequestMapping("glydl")
@CrossOrigin(origins = "*")
public class glydlController {

    @Autowired
    glydlService service;

    @ResponseBody
    @RequestMapping("glydl/{useraccount}/{password}")
    public ArrayList<user> glydl(@PathVariable String useraccount, @PathVariable String password){
        System.out.println("管理员登陆注册方法执行中，账号:"+useraccount+"密码："+password);
        ArrayList<user> user = service.glydl(useraccount,password);
        System.out.println("查询结束，返回："+user);
        return user;
    }

}
